#include <STC15F2K60S2.H>
#include "smg.h"
#include "DS1302.h"

unsigned char Sec;

void main()
{
	All_Init();
	DS1302_Init();
	
	DS1302_SetTime();
//	DS1302_WriteByte(0x80,0x03);
	
	while(1)
	{
//		Sec = DS1302_ReadByte(0x81);
//		Nixie(1, Sec / 10);
//		Nixie(2, Sec % 10);
		
		DS1302_ReadTime();
		
		Nixie(1,DS1302_Time[3]/10);
		Nixie(2,DS1302_Time[3]%10);
		
		Nixie(4,DS1302_Time[4]/10);
		Nixie(5,DS1302_Time[4]%10);
		
		Nixie(7,DS1302_Time[5]/10);
		Nixie(8,DS1302_Time[5]%10);
	}
}
